import langsmith
from langchain import chat_models
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchain_google_genai import ChatGoogleGenerativeAI

# Define your runnable or chain below.
prompt = ChatPromptTemplate.from_messages(
  [
    ("system", "You are a helpful AI assistant."),
    ("human", "{input}")
  ]
)
#llm = chat_models.ChatOpenAI(model="gpt-3.5-turbo", temperature=0)

llm = ChatGoogleGenerativeAI(model="models/gemini-1.5-pro-latest", temperature=0.7)
chain = prompt | llm | StrOutputParser()

client = langsmith.Client()
chain_results = client.run_on_dataset(
    dataset_name="first project name",
    llm_or_chain_factory=chain,
    project_name="test-this-youth-639",
    concurrency_level=5,
    verbose=True,
)
print(chain_results)